<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>inspinia 2.9.2 | 敏捷板</title>
    <link rel="stylesheet" href="https://www.layuicdn.com/layui/css/layui.css">
    <link href="css/style.css" rel="stylesheet">

</head>

<body>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="layui-row layui-col-space20">
            <div class="layui-col-md4">
                <div class="ibox">
                    <div class="ibox-content">
                        <h3>待完成</h3>
                        <p class="small"><i class="fa fa-hand-o-up"></i> 在列表之间拖动任务</p>

                        <ul class="sortable-list connectList agile-list" id="todo">
                            <li class="warning-element" id="task1">
                                待完成克隆新技术,可以拖动到任意一个盒子
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标签</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="success-element" id="task2">
                                待完成克隆新技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="info-element" id="task3">
                                待完成克隆新技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="danger-element" id="task4">
                                待完成克隆新技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-primary">完成</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task5">
                                待完成克隆新技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标签</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task6">
                                待完成克隆新技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-primary">完成</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="success-element" id="task7">
                                待完成克隆新技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="info-element" id="task8">
                                待完成克隆新技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="ibox">
                    <div class="ibox-content">
                        <h3>进行中</h3>
                        <p class="small"><i class="fa fa-hand-o-up"></i> 在列表之间拖动任务</p>
                        <ul class="sortable-list connectList agile-list" id="inprogress">
                            <li class="success-element" id="task9">
                                进行中的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标签</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="success-element" id="task10">
                                进行中的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task11">
                                进行中的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task12">
                                进行中的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标签</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="info-element" id="task13">
                                进行中的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-primary">完成</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="success-element" id="task14">
                                进行中的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="danger-element" id="task15">
                                进行中的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="ibox">
                    <div class="ibox-content">
                        <h3>已完成</h3>
                        <p class="small"><i class="fa fa-hand-o-up"></i> 在列表之间拖动任务</p>
                        <ul class="sortable-list connectList agile-list" id="completed">
                            <li class="info-element" id="task16">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task17">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标签</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task18">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标签</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task19">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-primary">完成</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="success-element" id="task20">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="info-element" id="task21">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="warning-element" id="task22">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标签</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                            <li class="success-element" id="task23">
                                已完成的克隆技术
                                <div class="agile-detail">
                                    <a href="#" class="float-right btn btn-xs btn-white">标记</a>
                                    <i class="fa fa-clock-o"></i> 2017.12.12
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

        </div>

        <div class="row">
            <div class="col-lg-12">

                <h4>
                    序列化输出
                </h4>
                <p>
                    将sortable的项目ID序列化为字符串数组。
                </p>

                <div class="output p-m m white-bg"></div>


            </div>
        </div>
    </div>

    <!-- Mainly scripts -->
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

    <!-- jquery UI -->
    <script src="js/jquery-ui.min.js"></script>

    <script>
        $(document).ready(function(){

            $("#todo, #inprogress, #completed").sortable({
                connectWith: ".connectList",
                update: function( event, ui ) {

                    var todo = $( "#todo" ).sortable( "toArray" );
                    var inprogress = $( "#inprogress" ).sortable( "toArray" );
                    var completed = $( "#completed" ).sortable( "toArray" );
                    $('.output').html("ToDo: " + window.JSON.stringify(todo) + "<br/>" + "In Progress: " + window.JSON.stringify(inprogress) + "<br/>" + "Completed: " + window.JSON.stringify(completed));
                }
            }).disableSelection();

        });
    </script>

</body>
</html>
